#ifndef _QUADTREE_
#define _QUADTREE_
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <iostream>
#include <iomanip>
#include "Object.h"
#include "Mario.h"
#include "Node.h"

#include <cmath>
#include <algorithm>
#include <limits>
#include <list>

using namespace std;





class QuadTree
{
public:
	
	Node *root;
	
public:
	list<Object*> _list;
	Node* getRoot() {return root;}
	void setRoot(Node * n) {this->root = n;}
	QuadTree();
	~QuadTree();
	int Clip(int x1, int x2, int x3, int x4);
	int ClipXY(Node * node, RECT rect);
	void ClipView(Node *node, RECT view, list<Object*>* _listObject);

	void getObjectFromCamara(RECT camara_rect, list<Object*>* _listObject);


};

#endif 